<template>
  <view class="personalData">
    <view class="per-header">
      <img src="/static/other/personalData/left.png" alt="返回" mode="aspectFill" class="header-img" @click="goback" />
      <text class="header-text">个人资料</text>
      <text class="null"></text>
    </view>
    <view class="per-body">
      <view class="per-body-touxiang">
        <img src="/static/touxiang.png" alt="头像" mode="aspectFit" class="touxiang-img" />
      </view>
      <view class="per-body-element">
        <view class="body-element-content">
          <view class="content-item">
            <text class="item-text">账号名称：</text>
            <text class="item-value">{{userInfo.id}}</text>
          </view>
          <view class="content-item">
            <text class="item-text">单位：</text>
            <text class="item-value">{{userInfo.organize}}</text>
          </view>
          <view class="content-item no-border">
            <text class="item-text">职务:</text>
            <text class="item-value">{{userInfo.position}}</text>
          </view>
        </view>
        <view class="per-body-number">
          <text class="item-text">手机号：</text>
          <text class="item-value">{{userInfo.mobilePhone}}</text>
        </view>
      </view>
    </view>
  </view>
</template>
<script>
  export default {
    data() {
      return {
        userInfo:{}
      }
    },
    onLoad(){
      this.userInfo=uni.getStorageSync('userInfo')
    },
    methods: {
      goback() {
        uni.navigateBack({
          delta: 1
        });
      },
    }
  }
</script>
<style lang="scss" scoped>
  .personalData {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(to bottom, #eaf6ff, #f5faff);
    padding-top: 25px;

    .per-header {
      display: flex;
      padding: 0 20px;
      height: 30px;
      align-items: center;
      justify-content: space-between;

      .header-img {
        width: 25px;
      }

      .header-text {
        font-size: 17px;
        font-weight: 650;
      }

      .null {
        width: 1.5625rem;
      }
    }

    .per-body {
      flex: 1;
      display: flex;
      flex-direction: column;
      max-height: calc(100vh - 60px);
      overflow-y: auto;

      .per-body-touxiang {
        margin-top: 30px;
        display: flex;
        justify-content: center;
        padding: 15px;

        .touxiang-img {
          width: 70px;
          border-radius: 15px;
        }
      }

      .per-body-element {
        display: flex;
        flex-direction: column;

        .body-element-content {
          margin-top: 50px;
          margin-left: 15px;
          margin-right: 15px;
          border-radius: 15px;
          background-color: white;
          padding: 20px;

          .content-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px;
            border-bottom: 1px solid #e0e0e0;

            .item-text {
              width: 80px;
              font-size: 15px;
              font-weight: 550;
            }

            .item-value {
              flex: 1;
              text-align: right;
              font-size: 13px;
              font-weight: 500;
              color: gray;
            }
          }

          .no-border {
            border-bottom: none !important;
          }
        }

        .per-body-number {
          display: flex;
          align-items: center;
          justify-content: space-between;
          margin: 15px;
          padding: 30px;
          background-color: white;
          border-radius: 15px;

          .item-text {
            width: 80px;
            font-size: 15px;
            font-weight: 550;
          }

          .item-value {
            flex: 1;
            text-align: right;
            font-size: 13px;
            font-weight: 500;
            color: gray;
          }
        }
      }
    }
  }
</style>
